52351c384c3b3945ab0c88ea20555092664ecbda,opennms-services/src/main/java/org/opennms/netmgt/charts/ChartUtils.java,ChartUtils,createBarChart,#BarChart#DefaultCategoryDataset#,238
Before Change
*/
private static JFreeChart createBarChart(BarChart chartConfig, DefaultCategoryDataset baseDataSet) {
PlotOrientation po = (chartConfig.getPlotOrientation() == "horizontal" ? PlotOrientation.HORIZONTAL : PlotOrientation.VERTICAL);
JFreeChart barChart = ChartFactory.createBarChart(chartConfig.getTitle().getValue(),
chartConfig.getDomainAxisLabel(),
chartConfig.getRangeAxisLabel(),
baseDataSet,
po,
chartConfig.getShowLegend(),
chartConfig.getShowToolTips(),
chartConfig.getShowUrls());
// Create a bit more headroom for value labels than is allowed for by the default 0.05 upper margin
ValueAxis rangeAxis = barChart.getCategoryPlot().getRangeAxis();
After Change
private static JFreeChart createBarChart(BarChart chartConfig, DefaultCategoryDataset baseDataSet) {
PlotOrientation po = (chartConfig.getPlotOrientation() == "horizontal" ? PlotOrientation.HORIZONTAL : PlotOrientation.VERTICAL);
JFreeChart barChart = null;
if ("3d".equalsIgnoreCase(chartConfig.getVariation())) {
barChart = ChartFactory.createBarChart3D(chartConfig.getTitle().getValue(),
chartConfig.getDomainAxisLabel(),
chartConfig.getRangeAxisLabel(),
baseDataSet,
po,
chartConfig.getShowLegend(),
chartConfig.getShowToolTips(),
chartConfig.getShowUrls());
} else {
barChart = ChartFactory.createBarChart(chartConfig.getTitle().getValue(),
chartConfig.getDomainAxisLabel(),
chartConfig.getRangeAxisLabel(),
baseDataSet,
po,
chartConfig.getShowLegend(),
chartConfig.getShowToolTips(),
chartConfig.getShowUrls());
}
// Create a bit more headroom for value labels than is allowed for by the default 0.05 upper margin